#include "vector.hpp"
#include <vector>
#include <string>         // std::string
#include <iostream>
#include <map>

using namespace std;
void vectorTest()
{
    vector<char> v1;
    v1.push_back('m');
    v1.push_back('n');
    v1.push_back('o');
    v1.push_back('p');
    
    vector<char>::iterator iter1;
    vector<char>::iterator iter2;
    vector<char>::iterator iter3;
    iter1 = v1.begin();
    iter2 = v1.end();
    iter3 = v1.end()-1;
//    printf("front: %c, end: %c, end-1: %c\n",  v1.front(), *iter2, *iter3);
    
    map<string, int> m;
    m["one"] = 1;
    m["second"] = 2;
//    m[""] = 0;
    map<string, int>::iterator find = m.find("second");
    map<string, int>::iterator end;
    end = m.end();
    end--;
    bool b = find == end;
    m["second"] = 333;
    cout << find->first << "  " << find->second << "\n" << endl;
    cout << end->first  << "  " << end->second  << "\n" << endl;
    cout << b << endl;
    
}
